<template>
<!--  <div class=backGru>
    <h1>请使用电脑版访问管理系统</h1>
  </div>
  <el-button @click="redirect" type="success" >返回登录</el-button>-->
  <div v-if="$store.getters.roles.includes('admin')">
    <el-button @click="$router.replace('/homepage')" type="success" >返回首页</el-button>
  </div>
  <div v-else>
    <el-button @click="$router.replace('/')" type="success" >返回首页</el-button>
  </div>


</template>

<script>
export default {
  name: "index",
  methods:{
    redirect(){
      this.$store.dispatch('user/resetToken')
      this.$router.replace('/login')
    }
  }
}
</script>

<style scoped>

</style>
